/*
 * Copyright (c) ShaoxiongDu <Shaoxiong.dev@aliyun.com> 2021 all Rights Reserved
 */

package zh.codegym.task.task07.task0712;

import java.util.ArrayList;
import java.util.Scanner;

/* 
最短或最长
*/

public class Solution {
    public static void main(String[] args) throws Exception {
        //在此编写你的代码
        Scanner scanner = new Scanner(System.in);
        ArrayList<String> strings = new ArrayList<>();

        for (int i = 0; i < 10; i++) {
            strings.add(scanner.next());
        }
        int maxindex = 0;
        int minindex = 0;
        int min = strings.get(0).length();
        String mins = null;
        int max = strings.get(0).length();
        String maxs = null;
        for (int j = 0; j < strings.size(); j++) {
            int k = strings.get(j).length();
            if (k > max) {
                max = k;
                maxs = strings.get(j);
                maxindex = j;
            }

            if (k < min) {
                min = k;
                mins = strings.get(j);
                minindex = j;
            }

        }
        if (maxindex < minindex) {
            System.out.println(maxs);
        } else {
            System.out.println(mins);
        }


    }
}
